package it.unibo.refolding.pico;

import java.util.Locale;

public enum DriverType {
  STRIP_CHART, PLAIN_REFOLDING, APPROACH_RETRACTION, FETCH_REFOLD_BREAK;

  public static DriverType of(String s) {
    String l = s.toLowerCase(Locale.ROOT);
    if ("stripchart".equals(l)) {
      return STRIP_CHART;
    }
    if ("plainrefolding".equals(l)) {
      return PLAIN_REFOLDING;
    }
    if ("approachretraction".equals(l)) {
      return APPROACH_RETRACTION;
    }
    if ("fetchrefoldbreak".equals(l)) {
      return FETCH_REFOLD_BREAK;
    }
    throw new IllegalArgumentException(s + " is not valid.");
  }
}
